home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HTBasic 9.3
/
HTBasic 9.3.iso
/
83win
/
data1.cab
/
Basic_Plus_Examples
/
BARTEST
< prev
next >
Wrap
Text File
|
2001-03-02
|
1KB
|
31 lines
10 ! **********************************************************
20 ! Example: BAR Test
30 !
40 ! This program creates a BAR widget with three ranges.
50 ! As the bar height progesses from the LOW range through
60 ! the middle range to the HIGH range, the bar color changes
70 ! from green to yellow to red. When the bar is in the LOW
80 ! or the HIGH range, the program beeps throughout the range.
90 !
100 ! **********************************************************
110 !
120 INTEGER N,M
130 ASSIGN @Bar TO WIDGET "BAR"
140 CONTROL @Bar;SET ("TITLE":" Example: BAR Test")
150 CONTROL @Bar;SET ("X":100,"Y":20,"WIDTH":200,"HEIGHT":200)
160 CONTROL @Bar;SET ("ALARM RANGES":"LOW,HIGH","ALARM TYPE":"BEEP")
170 CONTROL @Bar;SET ("LOW LIMIT":10,"HIGH LIMIT":90)
180 CONTROL @Bar;SET ("SYSTEM MENU":"Quit")
190 ON EVENT @Bar,"SYSTEM MENU" GOTO Finis
200 !
210 FOR M=1 TO 3
220 FOR N=1 TO 100
230 WAIT .05
240 CONTROL @Bar;SET ("VALUE":N)
250 NEXT N
260 WAIT 1
270 NEXT M
280 !
290 Finis:!
300 END